﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;

namespace CodeStash.Common.DataAccess.EntityFramework
{
    [DataContract]
    public partial class CodeTag
    {
        public CodeTag()
        {

        }

        public CodeTag(string description, int matchingSnippetId)
        {
            this.Description = description;
            this.MatchingSnippetId = matchingSnippetId;
        }

        [Key]
        [DataMember]
        public int TagId { get; set; }

        [DataMember]
        public string Description { get; set; }

        [ForeignKey("CodeSnippetId")]
        [DataMember]
        public int MatchingSnippetId { get; set; }

        [DataMember]
        [ScriptIgnore]
        public virtual CodeSnippet CodeSnippet { get; set; }
    }
}